namespace FoundationLib.Ifc.Events
{
	/// <summary>
	/// An abstract base class for domain events.
	/// </summary>
	/// <remarks>This base class may be used to create bubble domain events. Event handlers 
	/// may choose to abort handling the event received based on evaluating the <see cref="Handled"/> property.</remarks>
	public abstract class DomainEvent : IDomainEvent
	{
		/// <summary>
		/// Indicates whether this event was handled by a domain event handler
		/// </summary>
		private bool handled = false;

		/// <summary>
		/// Gets or sets a value indicating whether this event was handled by a domain event handler.
		/// </summary>
		public bool Handled
		{
			get
			{
				return this.handled;
			}
			set
			{
				this.handled = value;
			}
		}
	}
}
